<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2017/12/11
  Time: 16:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String jsessionid = session.getId();
%>
<form id="form_leave_finish" class="panel-body form-horizontal form-padding">
  <input type="hidden" name="leaveId" id="leaveId" value="${leaveId}"/>

  <div class="form-group">
    <label class="col-md-2 control-label">是否完成加班</label>
    <div class="col-md-6">
      <div class="radio">
        <input type="radio" id="isComplete1" name="isComplete" value="是" class="magic-radio" <c:if test="${leave.isComplete=='是'}">checked</c:if> >
        <label for="isComplete1">是</label>
        <input type="radio" id="isComplete2" name="isComplete" value="否" class="magic-radio" <c:if test="${leave.isComplete=='否'}">checked</c:if> >
        <label for="isComplete2">否</label>
      </div>
    </div>
  </div>

</form>

<script>

  function fn_leave_finish_save(callback) {
    var tmp = $(":checked[name='isComplete']").val();
    if(!tmp){
      __toastr_error("请选择是否完成休假！");
      return false;
    }

    __form_save('form_leave_finish', '<%=path%>/com/leave/saveFinish',function(data){
      if(data.state == 1){
        callback(data);
      } else {
        callback();
      }
    },function(){
      callback();
    });

  }

</script>
